home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 18 / AMIGAplus Sonderheft 18 (1999)(ICP)(DE)[!].iso / PD / Anwendungen / ppclibemu / README < prev    next >
Text File  |  1999-01-03  |  8KB  |  242 lines

  1.  
  2. ---------- ppclibemu V0.4a - The ppc.library emulation for WarpOS ----------
  3.  
  4.  
  5. INTRODUCTION
  6.     This is the first try for an emulation of the PowerUp-ppc.library
  7.     under WarpOS. It's not even alpha, it's a very early pre-release
  8.     with only the most important functions implemented. My main in-
  9.     tention in this release was to show that emulation is possible.
  10.  
  11.     Emulation of the whole ppc.library messaging system is still
  12.     missing, so you are limited to simple ELF objects, which may either
  13.     be started by SAS/C's runelf or Ralph Schmidt's PPCLoad. You cannot
  14.     take vbcc's PPCRun, for example, because it uses startup-messages.
  15.  
  16.     The following functions of the original ppc.library are supported:
  17.       o PPCLoadObject
  18.       o PPCUnLoadObject
  19.       o PPCRunObject
  20.       o PPCAllocMem (MEMF_NOCACHESYNCxxx not supported)
  21.       o PPCFreeMem
  22.       o PPCAllocVec (MEMF_NOCACHESYNCxxx not supported)
  23.       o PPCFreeVec
  24.       o PPCDebugMode (private, doesn't work like the original)
  25.       o PPCCreateTask (only synchronous tasks)
  26.       o PPCGetAttrs (PPCINFOTAG_EXCEPTIONHOOK not supported)
  27.       o PPCReadLong
  28.       o PPCWriteLong
  29.       o PPCGetObjectAttrs
  30.       o PPCWriteLongFlush
  31.       o PPCReadWord
  32.       o PPCWriteWord
  33.       o PPCReadByte
  34.       o PPCWriteByte
  35.       o PPCLoadObjectTagList
  36.  
  37.     The following functions of the original PowerUp kernel are supported:
  38.       o PPCAdd64
  39.       o PPCAdd64p
  40.       o PPCAddHead
  41.       o PPCAddHeadSync (implementation may be incorrect)
  42.       o PPCAddTail
  43.       o PPCAddTailSync (implementation may be incorrect)
  44.       o PPCAllocMem (NOCACHESYNCM68K simulated by allocating chip RAM)
  45.       o PPCAllocPooled (No pooled mem under WOS, same as PPCAllocMem)
  46.       o PPCAllocVec (NOCACHESYNCM68K simulated by allocating chip RAM)
  47.       o PPCAllocVecPooled (No pooled mem under WOS, same as PPCAllocVec)
  48.       o PPCAnd64
  49.       o PPCAnd64p
  50.       o PPCAsl64
  51.       o PPCAsl64p
  52.       o PPCAsr64
  53.       o PPCAsr64p
  54.       o PPCCallM68k (Flags ignored. Asynchronous calls are synchronous.)
  55.       o PPCCallOS (Flags ignored. Asynchronous calls are synchronous.)
  56.       o PPCClose
  57.       o PPCCmp64
  58.       o PPCCmp64p
  59.       o PPCCreatePool (No pooled mem under WOS, returns dummy)
  60.       o PPCDeletePool (Dummy. No pooled mem under WOS)
  61.       o PPCDivRem64
  62.       o PPCDivRem64p
  63.       o PPCDivs64
  64.       o PPCDivs64p
  65.       o PPCDivu64
  66.       o PPCDivu64p
  67.       o PPCEnqueue
  68.       o PPCEnqueueSync (implementation may be incorrect)
  69.       o PPCFreeMem
  70.       o PPCFreePooled (No pooled mem under WOS, same as PPCFreeMem)
  71.       o PPCFreeVec
  72.       o PPCFreeVecPooled (No pooled mem under WOS, same as PPCFreeVec)
  73.       o PPCInsert
  74.       o PPCInsertSync (implementation may be incorrect)
  75.       o PPCLsl64
  76.       o PPCLsl64p
  77.       o PPCLsr64
  78.       o PPCLsr64p
  79.       o PPCMods64
  80.       o PPCMods64p
  81.       o PPCModu64
  82.       o PPCModu64p
  83.       o PPCMuls64
  84.       o PPCMuls64p
  85.       o PPCMulu64
  86.       o PPCMulu64p
  87.       o PPCNeg64
  88.       o PPCNeg64p
  89.       o PPCNewList
  90.       o PPCNextTagItem
  91.       o PPCOpen
  92.       o PPCOr64
  93.       o PPCOr64p
  94.       o PPCRead
  95.       o PPCRemHead
  96.       o PPCRemHeadSync (implementation may be incorrect)
  97.       o PPCRemove
  98.       o PPCRemoveSync (implementation may be incorrect)
  99.       o PPCRemTail
  100.       o PPCRemTailSync (implementation may be incorrect)
  101.       o PPCSeek
  102.       o PPCSub64
  103.       o PPCSub64p
  104.       o PPCWrite
  105.       o PPCXor64
  106.       o PPCXor64p
  107.       o memcpy
  108.       o strcmp
  109.       o strcpy
  110.       o strlen
  111.       o __adddi3
  112.       o __anddi3
  113.       o __ashldi3
  114.       o __ashrdi3
  115.       o __cmpdi2
  116.       o __divdi3
  117.       o __fixdfdi
  118.       o __fixsfdi
  119.       o __fixunsdfdi
  120.       o __fixunssfdi
  121.       o __floatdidf
  122.       o __floatdisf
  123.       o __floatunsdidf
  124.       o __iordi3
  125.       o __lmulq
  126.       o __lshldi3
  127.       o __lshrdi3
  128.       o __moddi3
  129.       o __muldi3
  130.       o __negdi2
  131.       o __qdivrem
  132.       o __subdi3
  133.       o __ucmpdi2
  134.       o __udivdi3
  135.       o __umoddi3
  136.       o __xordi3
  137.  
  138.     Unimplemented M68k functions will return with d0=0 and PPC
  139.     functions return with r3=0.
  140.  
  141.  
  142. REQUIREMENTS
  143.     o 68040 or 68060
  144.     o CyberstormPPC, maybe BlizzardPPC
  145.     o WarpOS with powerpc.library V14
  146.     o runelf or PPCLoad
  147.  
  148.     I've never seen a BPPC, so I can't guarantee that it works, but I
  149.     expect problems with disabling the original ppc.library, which is
  150.     loaded very early on those systems. I would suggest to use the
  151.     normal WarpOS-termination functionality to remove the original
  152.     library from the system. Then you should be able to use the emula-
  153.     tion library. If anyone has experience with the BPPC, please mail me.
  154.  
  155.  
  156. INSTALLATION
  157.     If you want, save your original ppc.library:
  158.  
  159.       > copy libs:ppc.library libs:ppc.library.orig
  160.  
  161.     Copy the ppc.library emulation from this directory to libs:
  162.  
  163.       > copy ppc.library libs:
  164.  
  165.     The powerpc.library has to be patched. Otherwise it will prevent
  166.     the ppc.library from opening. The patch was tested with power-
  167.     pc.library 14.6 (16.07.98), but it should work for other versions
  168.     too:
  169.  
  170.       > repl libs:powerpc.library "ppc.library\0warp" "xxx.library\0warp"
  171.       libs:powerpc.library: Replacement at 0x16820
  172.       1 replacement(s) in libs:powerpc.library.
  173.  
  174.     Optionally, all these steps can be done automatically, be executing
  175.     the INSTALL script:
  176.       > execute INSTALL
  177.  
  178.     Reboot your system to flush the old ppc.library and/or load the
  179.     patched powerpc.library.
  180.  
  181.  
  182. USAGE
  183.     For a check, you might want to try the supplied test ELF object,
  184.     which was compiled by vbcc-ppc:
  185.  
  186.       > runelf hello_world.elf 
  187.       Hello World!
  188.  
  189.     The other program in "tests/" is objattr_demo, a 68k program for
  190.     testing the PPCGetObjectAttrs() function. For example, you can
  191.     try to list all symbols of hello_world.elf:
  192.  
  193.       > objattr_demo hello_world.elf
  194.       0x00000000      0x00000000      
  195.       0x00000000      0x00000000      
  196.       0x00000000      0x00000000      
  197.       0x00000000      0x00000000      
  198.       0x00000000      0x00000000      
  199.       0x00000110      0x00000000      __error
  200.       0x000001F8      0x00000100      parse_cli_args
  201.       [...]
  202.  
  203.     I know for sure that all ELF objects generated by vbcc-ppc, which
  204.     don't use any messaging, work very well. The same should apply to
  205.     gcc and SAS/C. I tested the following programs with succcess:
  206.       o ADoomPPC (don't forget to setenv DOOMWADDIR)
  207.       o VDoom (PPCLoad only - old startup code doesn't support runelf)
  208.       o Some demos: VAEDies and VAGhost (newer VA-demos don't work,
  209.         because they use the still unsupported PPC-TimerObjects)
  210.       o vbcc, vlink, pasm, etc. (all of my own utilities) compiled for
  211.         PPC-ELF.
  212.  
  213.  
  214. BUGS
  215.     Most functions of ppc.library and PowerUp kernel are simply not
  216.     supported, so I'm not interested in bug reports saying: "xyz
  217.     crashes, maybe it calls an unsupported function...".
  218.  
  219.     If you get any difficulties (I'm sure you will :), then try to
  220.     isolate the problem by enabling the debugging mode. The utility
  221.     ppcdbmode activates the internal debugging facilities of the emu-
  222.     lation library. Two bits are currently valid:
  223.       ppcdbmode 1      - enables all error requesters
  224.       ppcdbmode 0x8000 - enables serial debugging (you can use Sushi)
  225.  
  226.     Or ppcdbmode 0x8001 to enable both. The serial debugging will mainly
  227.     print informations from the M68k part (the ppc.library). Serial
  228.     debugging for the kernel is possible by exchanging the ppc.library
  229.     by ppc.library.debug. Then you will additionally get debugging info
  230.     for each kernel function being called.
  231.  
  232.     If you think that you found a bug, then send me the last lines of
  233.     this serial debugging output. You should be able to determine by
  234.     yourself, if it's a real bug or only an unimplemented function
  235.     which causes the problems.
  236.  
  237.  
  238.     Merry Christmas! :)
  239.  
  240.  
  241. Frank Wille                  20-Dec-1998                frank@phoenix.owl.de
  242.